<?php 
include("includes/code_admin.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title><?php echo SITEURL; ?> Administrator</title>
<link href="style_admin.css" rel="stylesheet" type="text/css" />

</head>

<body>
<div id="container">
<table class="main" cellspacing="0" cellpadding="0">
  <tr>
    <td class="header">
    <!-- header start -->
    <?php include("includes/header.php");?>
    <!-- header finish -->
    </td>
  </tr>
  <tr>
    <td class="middle">&nbsp;</td>
  </tr>
  <tr>
    <td>
    <!-- tepa start -->
<?php include("includes/tepa.php"); ?>
    <!-- tepa finish -->
    </td>
  </tr>
  <tr>
    <td>
    <!-- contant start -->
<table class="content" cellspacing="0" cellpadding="0">
  <tr valign="top">
    <td>

<!-- right col -->
<div class="right_col">
<h3 class="title">Sayt dizaynini boshqarish</h3>

<?php 
if(isset($_POST['send']))
{
	$design = $_POST['design_name'];
	if(empty($design)) { $design = 'default'; }
	
	$natija = mysql_query("UPDATE design SET name='$design' WHERE id='1'");
	if($natija=='true') 
	{
	echo "<p class='ok'>Dizayn o'zgardi, OK</p> <p><a href='../index.php' target='_blank'><b>Saytni ko'rish </b></a></p>";
	}
	else 
	{
	echo "<p class='error'>Afsuski dizayn o'zgarmadi, Adminga xabar qiling</p>"; 
	}

}

/// sayt dizaynini olamiz
$res_design = mysql_query("SELECT name FROM design");
$row_design = mysql_fetch_array($res_design);
$design = $row_design['name'];
/// sayt dizayni finish
?>
<fieldset>
<legend style="color:#456F98">Dizaynni tanlash</legend>

<form name="myform" action="" method="post">
<br>
<p> Dizaynni tanlang: 
    <select name="design_name">
        <option value="default"> Default design</option>
        <option value="blue"> Blue </option>
        <option value="white"> White </option>
        <option value="dark"> Dark </option>   
    </select>
    <input name="send" type="submit" value="Saqlash" /> 
</p>
<br>
<p>Hozirgi dizayn: <b><?php echo $design; ?></b></p>
</form>

</fieldset>
</div>
	<!-- right col finish -->
    </td>
  </tr>
</table>


    <!-- contant finish -->
    </td>
  </tr>
</table>
<!-- futer start -->
<?php include("includes/futer.php"); ?>
<!-- futer finish -->
</div>
</body>
</html>
